package com.rxmvp.rxmvpdemo.base.RecyclerView;

import android.support.v7.widget.RecyclerView;
import android.view.View;

import butterknife.ButterKnife;

/**
 * RecyclerView的ViewHolder基类，抽象了bindData的方法
 *
 * 作者： huangRZ on 2017/1/21. 15:04
 * 邮箱：917647409@qq.com
 */
public abstract class BaseViewHolder<T> extends RecyclerView.ViewHolder {

    View itemView;

    public BaseViewHolder(View itemView) {
        super(itemView);
        this.itemView = itemView;
        ButterKnife.bind(this, itemView);
    }

    /** 调用该方法，更新ViewHolder */
    protected abstract void bindData(T dataModel);
}
